<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script>
    async function getName(id) {
      // ... 异步函数
    }

    async function makeFriends(id1, id2) {
      const user1 = await getName(id1)
      const user2 = await getName(id2)
      return `${user1.name}和${user2.name}变成了好朋友`
    }
  </script>
</body>
</html>